From c5074d8cad1f82ba7887322bf85f52589c7cbede Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Fri, 11 Jun 1993 17:14:31 +0000 Subject: [PATCH] (Fmouse_position): Set up defaults before calling the hook. --- src/frame.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/frame.c b/src/frame.c index 290fb18ee6b..2287710e87f 100644 --- a/src/frame.c +++ b/src/frame.c @@ -754,19 +754,18 @@ and nil for X and Y.") Lisp_Object x, y; unsigned long long_dummy; + f = selected_frame; + x = y = Qnil; + + /* It's okay for the hook to refrain from storing anything. */ if (mouse_position_hook) (*mouse_position_hook) (&f, &lispy_dummy, &party_dummy, &x, &y, &long_dummy); - else - { - f = selected_frame; - x = y = Qnil; - } XSET (lispy_dummy, Lisp_Frame, f); - return Fcons (lispy_dummy, Fcons (make_number (x), make_number (y))); + return Fcons (lispy_dummy, Fcons (x, y)); } DEFUN ("set-mouse-position", Fset_mouse_position, Sset_mouse_position, 3, 3, 0, -- 2.30.2